package com.lian.pet.domain.vo;

import com.lian.pet.domain.entity.PetFeedinglogs;
import com.lian.pet.domain.entity.PetVaccines;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.util.Date;

@AllArgsConstructor
@Data
@Builder
@ApiModel("查询已接种疫苗信息")
public class PetVaccinesVO {
    private Integer id;
    @ApiModelProperty(value = "疫苗名称")
    private String vaccines;
    @ApiModelProperty(value = "接种时间")
    private Date vaccinationTime;

    public static PetVaccinesVO fromPetVaccines(PetVaccines entity) {
        return PetVaccinesVO.builder()
                .id(entity.getId())
                .vaccines(entity.getVaccines())
                .vaccinationTime(entity.getVaccinationTime())
                .build();
    }
}
